home *** CD-ROM | disk | FTP | other *** search
- #define BASE 10
-
- /**********************************************************************/
-
- /* This is too obvious to bother commenting. */
-
- unsigned int appendi2pstr(pstr, i)
- char *pstr;
- unsigned int i;
- {
- unsigned int j;
-
- j = 0;
- if (i >= BASE) j = appendi2pstr(pstr, i / BASE);
- pstr[++*pstr] = "0123456789ABCDEF"[i - j];
- return(BASE * i);
- }
-
- /**********************************************************************/
-
- void i2pstr(pstr, i)
- char *pstr;
- unsigned int i;
- {
- *pstr = 0;
- appendi2pstr(pstr, i);
- }
-
-